<?php
$to = "brent@nerdicide.com, kersanske.b@husky.neu.edu";
$theDate = getdate(date("U"));
$formattedDate = "$theDate[month] $theDate[mday], $theDate[year] at $theDate[hours]:$theDate[minutes]:$theDate[seconds]";
$subject = "[Cognition Lab] New Reasoning Experiment Results";
$experimentData = $_GET['expData'];
$message = "
<html>
<head>
<h1>Experiment Results submitted at $formattedDate</h1>
</head>
<body>
$experimentData
</body>
</html>
";

// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";

// More headers
$headers .= 'From: <webmaster@nerdicide.com>' . "\r\n";

mail($to,$subject,$message,$headers);
echo $message;
?>